#include<bits/stdc++.h>
using namespace std;
int n;
int a[100020];
bool vis[100020];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++) cin>>a[i];
    sort(a+1,a+n+1);
    reverse(a+1,a+n+1);
    int j=2;
    int t=n;
    for(int i=1;i<=n;i++){
        while(j<=n&&(a[i]<=a[j]||vis[j]==1)) j++;
        if(j==n+1) break;
        t--,vis[j]=1;
    }
    cout<<t<<endl;
    return 0;
}